g_autoptr(GFile) efi_new_config_temp = NULL;
g_autoptr(GFile) efi_orig_config = NULL;
g_autoptr(GFile) new_config_path = NULL;
- gs_unref_object GSSubprocessContext *procctx = NULL;
- gs_unref_object GSSubprocess *proc = NULL;
+ glnx_unref_object GSSubprocessContext *procctx = NULL;
+ glnx_unref_object GSSubprocess *proc = NULL;
gs_strfreev char **child_env = g_get_environ ();
g_autofree char *bootversion_str = g_strdup_printf ("%u", (guint)bootversion);
g_autoptr(GFile) config_path_efi_dir = NULL;
OstreeDeployment *
ostree_deployment_clone (OstreeDeployment *self)
{
- gs_unref_object OstreeBootconfigParser *new_bootconfig = NULL;
+ glnx_unref_object OstreeBootconfigParser *new_bootconfig = NULL;
GKeyFile *new_origin = NULL;
OstreeDeployment *ret = ostree_deployment_new (self->index, self->osname, self->csum,
self->deployserial,
{
OstreeFetcherPendingURI *pending = user_data;
GError *local_error = NULL;
- gs_unref_object SoupMessage *msg = NULL;
+ glnx_unref_object SoupMessage *msg = NULL;
pending->state = OSTREE_FETCHER_STATE_COMPLETE;
pending->request_body = soup_request_send_finish ((SoupRequest*) object,
GError **error)
{
gboolean ret = FALSE;
- gs_unref_object OstreeMutableTree *ret_dir = NULL;
+ glnx_unref_object OstreeMutableTree *ret_dir = NULL;
g_return_val_if_fail (name != NULL, FALSE);
GError **error)
{
gboolean ret = FALSE;
- gs_unref_object OstreeMutableTree *ret_subdir = NULL;
+ glnx_unref_object OstreeMutableTree *ret_subdir = NULL;
g_autofree char *ret_file_checksum = NULL;
ret_subdir = ot_gobject_refz (g_hash_table_lookup (self->subdirs, name));
gboolean ret = FALSE;
int i;
OstreeMutableTree *subdir = self; /* nofree */
- gs_unref_object OstreeMutableTree *ret_parent = NULL;
+ glnx_unref_object OstreeMutableTree *ret_parent = NULL;
g_assert (metadata_checksum != NULL);
g_autofree char *temp_filename = NULL;
g_autoptr(GFile) stored_path = NULL;
g_autofree guchar *ret_csum = NULL;
- gs_unref_object OstreeChecksumInputStream *checksum_input = NULL;
+ glnx_unref_object OstreeChecksumInputStream *checksum_input = NULL;
g_autoptr(GInputStream) file_input = NULL;
g_autoptr(GFileInfo) file_info = NULL;
gs_unref_variant GVariant *xattrs = NULL;
gboolean ret = FALSE;
g_autoptr(GFile) child = NULL;
g_autoptr(GFileInfo) modified_info = NULL;
- gs_unref_object OstreeMutableTree *child_mtree = NULL;
+ glnx_unref_object OstreeMutableTree *child_mtree = NULL;
g_autofree char *child_relpath = NULL;
const char *name;
GFileType file_type;
g_autoptr(GFileInfo) file_info = NULL;
gs_unref_ptrarray GPtrArray *split_path = NULL;
gs_unref_ptrarray GPtrArray *hardlink_split_path = NULL;
- gs_unref_object OstreeMutableTree *subdir = NULL;
- gs_unref_object OstreeMutableTree *parent = NULL;
- gs_unref_object OstreeMutableTree *hardlink_source_parent = NULL;
+ glnx_unref_object OstreeMutableTree *subdir = NULL;
+ glnx_unref_object OstreeMutableTree *parent = NULL;
+ glnx_unref_object OstreeMutableTree *hardlink_source_parent = NULL;
g_autofree char *hardlink_source_checksum = NULL;
- gs_unref_object OstreeMutableTree *hardlink_source_subdir = NULL;
+ glnx_unref_object OstreeMutableTree *hardlink_source_subdir = NULL;
g_autofree guchar *tmp_csum = NULL;
g_autofree char *tmp_checksum = NULL;
if (pull_data->gpg_verify)
{
- gs_unref_object OstreeGpgVerifyResult *result = NULL;
+ glnx_unref_object OstreeGpgVerifyResult *result = NULL;
result = ostree_repo_verify_commit_ext (pull_data->repo,
checksum,
gs_unref_hashtable GHashTable *requested_refs_to_fetch = NULL;
gs_unref_hashtable GHashTable *commits_to_fetch = NULL;
g_autofree char *remote_mode_str = NULL;
- gs_unref_object OstreeMetalink *metalink = NULL;
+ glnx_unref_object OstreeMetalink *metalink = NULL;
OtPullData pull_data_real = { 0, };
OtPullData *pull_data = &pull_data_real;
GKeyFile *remote_config = NULL;
gs_unref_variant GVariant *commit_variant = NULL;
gs_unref_variant GVariant *old_metadata = NULL;
gs_unref_variant GVariant *new_metadata = NULL;
- gs_unref_object OstreeGpgVerifyResult *result = NULL;
+ glnx_unref_object OstreeGpgVerifyResult *result = NULL;
GError *local_error = NULL;
if (!ostree_repo_load_variant (self, OSTREE_OBJECT_TYPE_COMMIT,
GError **error)
{
OstreeGpgVerifyResult *result = NULL;
- gs_unref_object OstreeGpgVerifier *verifier = NULL;
+ glnx_unref_object OstreeGpgVerifier *verifier = NULL;
gs_unref_variant GVariant *signaturedata = NULL;
GByteArray *buffer;
GVariantIter iter;
GCancellable *cancellable,
GError **error)
{
- gs_unref_object OstreeGpgVerifyResult *result = NULL;
+ glnx_unref_object OstreeGpgVerifyResult *result = NULL;
gboolean ret = FALSE;
result = ostree_repo_verify_commit_ext (self, commit_checksum,
const char *name;
GFileInfo *file_info = NULL;
GFile *child = NULL;
- gs_unref_object OstreeDeployment *deployment = NULL;
+ glnx_unref_object OstreeDeployment *deployment = NULL;
g_autofree char *csum = NULL;
gint deployserial;
GError **error)
{
gboolean ret = FALSE;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
g_return_val_if_fail (self->loaded, FALSE);
g_autoptr(GFile) source_etc_pristine_path = NULL;
g_autoptr(GFile) deployment_usretc_path = NULL;
g_autoptr(GFile) deployment_etc_path = NULL;
- gs_unref_object OstreeSePolicy *sepolicy = NULL;
+ glnx_unref_object OstreeSePolicy *sepolicy = NULL;
gboolean etc_exists;
gboolean usretc_exists;
else
{
int new_bootversion = self->bootversion ? 0 : 1;
- gs_unref_object OstreeBootloader *bootloader = NULL;
+ glnx_unref_object OstreeBootloader *bootloader = NULL;
g_autoptr(GFile) new_loader_entries_dir = NULL;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
gboolean show_osname = FALSE;
if (!_ostree_sysroot_query_bootloader (self, &bootloader, cancellable, error))
{
gboolean ret = FALSE;
gint new_deployserial;
- gs_unref_object OstreeDeployment *new_deployment = NULL;
- gs_unref_object OstreeDeployment *merge_deployment = NULL;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeDeployment *new_deployment = NULL;
+ glnx_unref_object OstreeDeployment *merge_deployment = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
g_autoptr(GFile) osdeploydir = NULL;
g_autoptr(GFile) deployment_var = NULL;
g_autoptr(GFile) commit_root = NULL;
g_autoptr(GFile) tree_kernel_path = NULL;
g_autoptr(GFile) tree_initramfs_path = NULL;
glnx_fd_close int deployment_dfd = -1;
- gs_unref_object OstreeSePolicy *sepolicy = NULL;
+ glnx_unref_object OstreeSePolicy *sepolicy = NULL;
g_autofree char *new_bootcsum = NULL;
- gs_unref_object OstreeBootconfigParser *bootconfig = NULL;
+ glnx_unref_object OstreeBootconfigParser *bootconfig = NULL;
g_return_val_if_fail (osname != NULL || self->booted_deployment != NULL, FALSE);
gboolean ret = FALSE;
guint i;
gs_unref_ptrarray GPtrArray *new_deployments = g_ptr_array_new_with_free_func (g_object_unref);
- gs_unref_object OstreeDeployment *new_deployment = NULL;
+ glnx_unref_object OstreeDeployment *new_deployment = NULL;
__attribute__((cleanup(_ostree_kernel_args_cleanup))) OstreeKernelArgs *kargs = NULL;
g_autofree char *new_options = NULL;
OstreeBootconfigParser *new_bootconfig;
GError **error)
{
gboolean ret = FALSE;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
char *refs_to_fetch[] = { self->origin_ref, NULL };
const char *from_revision = NULL;
g_autofree char *new_revision = NULL;
GError **error)
{
gboolean ret = FALSE;
- gs_unref_object OstreeDeployment *new_deployment = NULL;
+ glnx_unref_object OstreeDeployment *new_deployment = NULL;
if (!ostree_sysroot_deploy_tree (self->sysroot, self->osname,
self->new_revision,
dir = ot_gfile_get_child_build_path (ostree_dir, "repo", "objects", NULL);
if (!g_file_query_exists (dir, NULL))
{
- gs_unref_object OstreeRepo *repo = ostree_repo_new (repo_dir);
+ glnx_unref_object OstreeRepo *repo = ostree_repo_new (repo_dir);
if (!ostree_repo_create (repo, OSTREE_REPO_MODE_BARE,
cancellable, error))
goto out;
g_str_has_suffix (dent->d_name, ".conf") &&
S_ISREG (stbuf.st_mode))
{
- gs_unref_object OstreeBootconfigParser *config = ostree_bootconfig_parser_new ();
+ glnx_unref_object OstreeBootconfigParser *config = ostree_bootconfig_parser_new ();
if (!ostree_bootconfig_parser_parse_at (config, dfd_iter.fd, dent->d_name, cancellable, error))
{
{
gboolean ret = FALSE;
const char *relative_boot_link;
- gs_unref_object OstreeDeployment *ret_deployment = NULL;
+ glnx_unref_object OstreeDeployment *ret_deployment = NULL;
int entry_boot_version;
int treebootserial = -1;
int deployserial = -1;
{
gboolean ret = FALSE;
g_autofree char *ostree_arg = NULL;
- gs_unref_object OstreeDeployment *deployment = NULL;
+ glnx_unref_object OstreeDeployment *deployment = NULL;
ostree_arg = get_ostree_kernel_arg_from_config (config);
if (ostree_arg == NULL)
{
gboolean ret = FALSE;
gboolean is_active;
- gs_unref_object OstreeBootloader *ret_loader = NULL;
+ glnx_unref_object OstreeBootloader *ret_loader = NULL;
ret_loader = (OstreeBootloader*)_ostree_bootloader_syslinux_new (sysroot);
if (!_ostree_bootloader_query (ret_loader, &is_active,
gboolean ret = FALSE;
struct stat root_stbuf;
struct stat self_stbuf;
- gs_unref_object OstreeDeployment *ret_deployment = NULL;
+ glnx_unref_object OstreeDeployment *ret_deployment = NULL;
if (stat ("/", &root_stbuf) != 0)
{
ot_admin_builtin_cleanup (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
- gs_unref_object OstreeSysroot *sysroot = NULL;
+ glnx_unref_object OstreeSysroot *sysroot = NULL;
gboolean ret = FALSE;
context = g_option_context_new ("Delete untagged deployments and repository objects");
gboolean ret = FALSE;
const char *refspec;
GOptionContext *context;
- gs_unref_object OstreeSysroot *sysroot = NULL;
+ glnx_unref_object OstreeSysroot *sysroot = NULL;
GKeyFile *origin = NULL;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
gs_unref_ptrarray GPtrArray *new_deployments = NULL;
- gs_unref_object OstreeDeployment *new_deployment = NULL;
- gs_unref_object OstreeDeployment *merge_deployment = NULL;
+ glnx_unref_object OstreeDeployment *new_deployment = NULL;
+ glnx_unref_object OstreeDeployment *merge_deployment = NULL;
g_autofree char *revision = NULL;
__attribute__((cleanup(_ostree_kernel_args_cleanup))) OstreeKernelArgs *kargs = NULL;
ot_admin_builtin_diff (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
- gs_unref_object OstreeSysroot *sysroot = NULL;
+ glnx_unref_object OstreeSysroot *sysroot = NULL;
gboolean ret = FALSE;
- gs_unref_object OstreeDeployment *deployment = NULL;
+ glnx_unref_object OstreeDeployment *deployment = NULL;
g_autoptr(GFile) deployment_dir = NULL;
gs_unref_ptrarray GPtrArray *modified = NULL;
gs_unref_ptrarray GPtrArray *removed = NULL;
ot_admin_builtin_init_fs (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
- gs_unref_object OstreeSysroot *sysroot = NULL;
+ glnx_unref_object OstreeSysroot *sysroot = NULL;
gboolean ret = FALSE;
g_autoptr(GFile) dir = NULL;
g_autoptr(GFile) child = NULL;
- gs_unref_object OstreeSysroot *target_sysroot = NULL;
+ glnx_unref_object OstreeSysroot *target_sysroot = NULL;
guint i;
const char *normal_toplevels[] = {"boot", "dev", "home", "proc", "run", "sys"};
ot_admin_builtin_os_init (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
- gs_unref_object OstreeSysroot *sysroot = NULL;
+ glnx_unref_object OstreeSysroot *sysroot = NULL;
gboolean ret = FALSE;
const char *osname = NULL;
g_autoptr(GFile) deploy_dir = NULL;
const char *remotename = NULL;
const char *url = NULL;
const char *branch = NULL;
- gs_unref_object OstreeRepo *repo = NULL;
- gs_unref_object OstreeSysroot *sysroot = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeSysroot *sysroot = NULL;
OstreeDeployment *target_deployment = NULL;
context = g_option_context_new ("REMOTENAME URL [BRANCH]");
ot_admin_builtin_status (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
- gs_unref_object OstreeSysroot *sysroot = NULL;
+ glnx_unref_object OstreeSysroot *sysroot = NULL;
gboolean ret = FALSE;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
OstreeDeployment *booted_deployment = NULL;
gs_unref_ptrarray GPtrArray *deployments = NULL;
guint i;
GKeyFile *origin;
const char *ref = ostree_deployment_get_csum (deployment);
g_autofree char *version = version_of_commit (repo, ref);
- gs_unref_object OstreeGpgVerifyResult *result = NULL;
+ glnx_unref_object OstreeGpgVerifyResult *result = NULL;
GString *output_buffer;
guint jj, n_signatures;
GError *local_error = NULL;
{
gboolean ret = FALSE;
GOptionContext *context;
- gs_unref_object OstreeSysroot *sysroot = NULL;
+ glnx_unref_object OstreeSysroot *sysroot = NULL;
const char *new_provided_refspec = NULL;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
g_autofree char *origin_refspec = NULL;
g_autofree char *origin_remote = NULL;
g_autofree char *origin_ref = NULL;
g_autofree char *new_revision = NULL;
g_autoptr(GFile) deployment_path = NULL;
g_autoptr(GFile) deployment_origin_path = NULL;
- gs_unref_object OstreeDeployment *merge_deployment = NULL;
- gs_unref_object OstreeDeployment *new_deployment = NULL;
- gs_unref_object OstreeSysrootUpgrader *upgrader = NULL;
- gs_unref_object OstreeAsyncProgress *progress = NULL;
+ glnx_unref_object OstreeDeployment *merge_deployment = NULL;
+ glnx_unref_object OstreeDeployment *new_deployment = NULL;
+ glnx_unref_object OstreeSysrootUpgrader *upgrader = NULL;
+ glnx_unref_object OstreeAsyncProgress *progress = NULL;
gboolean changed;
GSConsole *console = NULL;
gboolean in_status_line = FALSE;
{
gboolean ret = FALSE;
GOptionContext *context;
- gs_unref_object OstreeSysroot *sysroot = NULL;
+ glnx_unref_object OstreeSysroot *sysroot = NULL;
const char *deploy_index_str;
int deploy_index;
gs_unref_ptrarray GPtrArray *current_deployments = NULL;
- gs_unref_object OstreeDeployment *booted_deployment = NULL;
- gs_unref_object OstreeDeployment *target_deployment = NULL;
+ glnx_unref_object OstreeDeployment *booted_deployment = NULL;
+ glnx_unref_object OstreeDeployment *target_deployment = NULL;
context = g_option_context_new ("INDEX - Delete deployment INDEX");
{
gboolean ret = FALSE;
GOptionContext *context;
- gs_unref_object OstreeSysroot *sysroot = NULL;
- gs_unref_object OstreeSysrootUpgrader *upgrader = NULL;
+ glnx_unref_object OstreeSysroot *sysroot = NULL;
+ glnx_unref_object OstreeSysrootUpgrader *upgrader = NULL;
g_autofree char *origin_remote = NULL;
g_autofree char *origin_ref = NULL;
g_autofree char *origin_refspec = NULL;
g_autofree char *new_revision = NULL;
g_autoptr(GFile) deployment_path = NULL;
g_autoptr(GFile) deployment_origin_path = NULL;
- gs_unref_object OstreeDeployment *merge_deployment = NULL;
- gs_unref_object OstreeDeployment *new_deployment = NULL;
+ glnx_unref_object OstreeDeployment *merge_deployment = NULL;
+ glnx_unref_object OstreeDeployment *new_deployment = NULL;
GSConsole *console = NULL;
gboolean in_status_line = FALSE;
- gs_unref_object OstreeAsyncProgress *progress = NULL;
+ glnx_unref_object OstreeAsyncProgress *progress = NULL;
gboolean changed;
OstreeSysrootUpgraderPullFlags upgraderpullflags = 0;
gboolean ret = FALSE;
guint bootversion;
g_autoptr(GFile) subpath = NULL;
- gs_unref_object OstreeSePolicy *sepolicy = NULL;
+ glnx_unref_object OstreeSePolicy *sepolicy = NULL;
gs_unref_ptrarray GPtrArray *deployments = NULL;
GOptionContext *context = NULL;
- gs_unref_object OstreeSysroot *sysroot = NULL;
+ glnx_unref_object OstreeSysroot *sysroot = NULL;
g_autoptr(GFile) deployment_path = NULL;
context = g_option_context_new ("[BOOTVERSION] - generate GRUB2 configuration from given BLS entries");
const char *policy_name;
g_autoptr(GFile) subpath = NULL;
const char *prefix = NULL;
- gs_unref_object OstreeSePolicy *sepolicy = NULL;
+ glnx_unref_object OstreeSePolicy *sepolicy = NULL;
gs_unref_ptrarray GPtrArray *deployments = NULL;
OstreeDeployment *first_deployment;
GOptionContext *context = NULL;
- gs_unref_object OstreeSysroot *sysroot = NULL;
+ glnx_unref_object OstreeSysroot *sysroot = NULL;
g_autoptr(GFile) deployment_path = NULL;
context = g_option_context_new ("[SUBPATH PREFIX] - relabel all or part of a deployment");
gs_unref_ptrarray GPtrArray *deployments = NULL;
OstreeDeployment *first_deployment = NULL;
GOptionContext *context = NULL;
- gs_unref_object OstreeSysroot *sysroot = NULL;
+ glnx_unref_object OstreeSysroot *sysroot = NULL;
__attribute__((cleanup(_ostree_kernel_args_cleanup))) OstreeKernelArgs *kargs = NULL;
context = g_option_context_new ("ARGS - set new kernel command line arguments");
ostree_builtin_cat (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
gboolean ret = FALSE;
int i;
const char *rev;
ostree_builtin_checkout (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
gboolean ret = FALSE;
const char *commit;
const char *destination;
ostree_builtin_commit (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
gboolean ret = FALSE;
gboolean skip_commit = FALSE;
g_autoptr(GFile) arg = NULL;
g_autoptr(GFile) root = NULL;
gs_unref_variant GVariant *metadata = NULL;
gs_unref_variant GVariant *detached_metadata = NULL;
- gs_unref_object OstreeMutableTree *mtree = NULL;
+ glnx_unref_object OstreeMutableTree *mtree = NULL;
g_autofree char *tree_type = NULL;
gs_unref_hashtable GHashTable *mode_adds = NULL;
OstreeRepoCommitModifierFlags flags = 0;
ostree_builtin_config (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context = NULL;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
gboolean ret = FALSE;
const char *op;
const char *section_key;
{
gboolean ret = FALSE;
GOptionContext *context;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
const char *src;
const char *target;
g_autofree char *src_prev = NULL;
{
gboolean ret = FALSE;
GOptionContext *context;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
GHashTableIter hash_iter;
gpointer key, value;
gboolean found_corruption = FALSE;
GError **error)
{
GVariantDict metadata_dict;
- gs_unref_object OstreeGpgVerifyResult *result = NULL;
+ glnx_unref_object OstreeGpgVerifyResult *result = NULL;
gs_unref_variant GVariant *old_metadata = NULL;
gs_unref_variant GVariant *new_metadata = NULL;
gs_unref_variant GVariant *signature_data = NULL;
ostree_builtin_gpg_sign (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
g_autofree char *resolved_commit = NULL;
const char *commit;
char **key_ids;
ostree_builtin_init (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context = NULL;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
gboolean ret = FALSE;
OstreeRepoMode mode;
GError **error)
{
GOptionContext *context;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
gboolean ret = FALSE;
const char *rev;
g_autofree char *checksum = NULL;
ostree_builtin_ls (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
gboolean ret = FALSE;
const char *rev;
int i;
{
gboolean ret = FALSE;
GOptionContext *context;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
g_autofree char *formatted_freed_size = NULL;
OstreeRepoPruneFlags pruneflags = 0;
gint n_objects_total;
{
gboolean ret = FALSE;
GOptionContext *context;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
int i;
const char *src_repo_arg;
GSConsole *console = NULL;
g_autofree char *src_repo_uri = NULL;
- gs_unref_object OstreeAsyncProgress *progress = NULL;
+ glnx_unref_object OstreeAsyncProgress *progress = NULL;
gs_unref_ptrarray GPtrArray *refs_to_fetch = NULL;
gs_unref_hashtable GHashTable *source_objects = NULL;
if (argc == 2)
{
g_autoptr(GFile) src_repo_path = g_file_new_for_path (src_repo_arg);
- gs_unref_object OstreeRepo *src_repo = ostree_repo_new (src_repo_path);
+ glnx_unref_object OstreeRepo *src_repo = ostree_repo_new (src_repo_path);
gs_unref_hashtable GHashTable *refs_to_clone = NULL;
refs_to_fetch = g_ptr_array_new_with_free_func (g_free);
ostree_builtin_pull (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
gboolean ret = FALSE;
g_autofree char *remote = NULL;
OstreeRepoPullFlags pullflags = 0;
GSConsole *console = NULL;
gs_unref_ptrarray GPtrArray *refs_to_fetch = NULL;
- gs_unref_object OstreeAsyncProgress *progress = NULL;
+ glnx_unref_object OstreeAsyncProgress *progress = NULL;
gulong signal_handler_id = 0;
context = g_option_context_new ("REMOTE [BRANCH...] - Download data from remote repository");
{
gboolean ret = FALSE;
GOptionContext *context;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
const char *refspec_prefix = NULL;
gs_unref_hashtable GHashTable *refs = NULL;
GHashTableIter hashiter;
GError **error)
{
GOptionContext *context;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
gboolean ret = FALSE;
const char *ref;
const char *target = NULL;
ostree_builtin_rev_parse (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
gboolean ret = FALSE;
const char *rev = "master";
int i;
if (objtype == OSTREE_OBJECT_TYPE_COMMIT)
{
- gs_unref_object OstreeGpgVerifyResult *result = NULL;
+ glnx_unref_object OstreeGpgVerifyResult *result = NULL;
GError *local_error = NULL;
g_autoptr(GFile) gpg_homedir = opt_gpg_homedir ? g_file_new_for_path (opt_gpg_homedir) : NULL;
ostree_builtin_show (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
gboolean ret = FALSE;
const char *rev;
g_autofree char *resolved_rev = NULL;
gs_unref_ptrarray GPtrArray *delta_names = NULL;
guint i;
GOptionContext *context;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
context = g_option_context_new ("LIST - list static delta files");
{
gboolean ret = FALSE;
GOptionContext *context;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
context = g_option_context_new ("Generate static delta files");
if (!ostree_option_context_parse (context, generate_options, &argc, &argv, OSTREE_BUILTIN_FLAG_NONE, &repo, cancellable, error))
const char *patharg;
g_autoptr(GFile) path = NULL;
GOptionContext *context;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
context = g_option_context_new ("DELTA - Apply static delta file");
if (!ostree_option_context_parse (context, apply_offline_options, &argc, &argv, OSTREE_BUILTIN_FLAG_NONE, &repo, cancellable, error))
gboolean ret = FALSE;
OstreeCommand *command = NULL;
const char *cmdname = NULL;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
int i;
gboolean want_help = FALSE;
{
gboolean ret = FALSE;
GOptionContext *context;
- gs_unref_object OstreeRepo *repo = NULL;
+ glnx_unref_object OstreeRepo *repo = NULL;
context = g_option_context_new ("Manage summary metadata");
const char *dirpath;
OtTrivialHttpd appstruct = { 0, };
OtTrivialHttpd *app = &appstruct;
- gs_unref_object SoupServer *server = NULL;
+ glnx_unref_object SoupServer *server = NULL;
g_autoptr(GFileMonitor) dirmon = NULL;
context = g_option_context_new ("[DIR] - Simple webserver");
GCancellable *cancellable,
GError **error)
{
- gs_unref_object GSSubprocessContext *ctx = NULL;
- gs_unref_object GSSubprocess *proc = NULL;
+ glnx_unref_object GSSubprocessContext *ctx = NULL;
+ glnx_unref_object GSSubprocess *proc = NULL;
g_autoptr(GFile) file = NULL;
g_autoptr(GFileIOStream) io = NULL;
GOutputStream *output;
GError **error)
{
g_autoptr(GFile) sysroot_path = NULL;
- gs_unref_object OstreeSysroot *sysroot = NULL;
+ glnx_unref_object OstreeSysroot *sysroot = NULL;
gboolean success = FALSE;
/* Entries are listed in --help output in the order added. We add the
test_metadata_checksum (void)
{
const char *checksum = "12345678901234567890123456789012";
- gs_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
+ glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
g_assert_null (ostree_mutable_tree_get_metadata_checksum (tree));
static void
test_mutable_tree_walk (void)
{
- gs_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
- gs_unref_object OstreeMutableTree *parent = NULL;
+ glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
+ glnx_unref_object OstreeMutableTree *parent = NULL;
gs_unref_ptrarray GPtrArray *split_path = NULL;
GError *error = NULL;
const char *pathname = "a/b/c/d/e/f/g/i";
checksum, &parent,
&error));
{
- gs_unref_object OstreeMutableTree *subdir = NULL;
+ glnx_unref_object OstreeMutableTree *subdir = NULL;
g_assert (ostree_mutable_tree_walk (tree, split_path, 0, &subdir, &error));
g_assert_nonnull (subdir);
}
{
- gs_unref_object OstreeMutableTree *subdir = NULL;
+ glnx_unref_object OstreeMutableTree *subdir = NULL;
g_assert_false (ostree_mutable_tree_walk (tree, split_path, 1, &subdir, &error));
g_assert_null (subdir);
g_clear_error (&error);
}
{
- gs_unref_object OstreeMutableTree *subdir = NULL;
- gs_unref_object OstreeMutableTree *a = NULL;
+ glnx_unref_object OstreeMutableTree *subdir = NULL;
+ glnx_unref_object OstreeMutableTree *a = NULL;
g_autofree char *source_checksum = NULL;
ostree_mutable_tree_lookup (tree, "a", &source_checksum, &a, &error);
g_assert (ostree_mutable_tree_walk (a, split_path, 1, &subdir, &error));
static void
test_ensure_parent_dirs (void)
{
- gs_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
- gs_unref_object OstreeMutableTree *parent = NULL;
+ glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
+ glnx_unref_object OstreeMutableTree *parent = NULL;
gs_unref_ptrarray GPtrArray *split_path = NULL;
GError *error = NULL;
const char *pathname = "/foo/bar/baz";
const char *checksum = "01234567890123456789012345678901";
g_autofree char *source_checksum = NULL;
- gs_unref_object OstreeMutableTree *source_subdir = NULL;
+ glnx_unref_object OstreeMutableTree *source_subdir = NULL;
g_autofree char *source_checksum2 = NULL;
- gs_unref_object OstreeMutableTree *source_subdir2 = NULL;
+ glnx_unref_object OstreeMutableTree *source_subdir2 = NULL;
g_assert (ot_util_path_split_validate (pathname, &split_path, &error));
static void
test_ensure_dir (void)
{
- gs_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
- gs_unref_object OstreeMutableTree *parent = NULL;
+ glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
+ glnx_unref_object OstreeMutableTree *parent = NULL;
gs_unref_ptrarray GPtrArray *split_path = NULL;
GError *error = NULL;
const char *dirname = "foo";
const char *filename = "bar";
const char *checksum = "01234567890123456789012345678901";
g_autofree char *source_checksum = NULL;
- gs_unref_object OstreeMutableTree *source_subdir = NULL;
+ glnx_unref_object OstreeMutableTree *source_subdir = NULL;
g_assert (ostree_mutable_tree_ensure_dir (tree, dirname, &parent, &error));
g_assert (ostree_mutable_tree_lookup (tree, dirname, &source_checksum, &source_subdir, &error));
static void
test_replace_file (void)
{
- gs_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
- gs_unref_object OstreeMutableTree *parent = NULL;
+ glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
+ glnx_unref_object OstreeMutableTree *parent = NULL;
gs_unref_ptrarray GPtrArray *split_path = NULL;
GError *error = NULL;
const char *filename = "bar";
g_assert (ostree_mutable_tree_replace_file (tree, filename, checksum, &error));
{
g_autofree char *out_checksum = NULL;
- gs_unref_object OstreeMutableTree *subdir = NULL;
+ glnx_unref_object OstreeMutableTree *subdir = NULL;
g_assert (ostree_mutable_tree_lookup (tree, filename, &out_checksum, &subdir, &error));
g_assert_cmpstr (checksum, ==, out_checksum);
}
g_assert (ostree_mutable_tree_replace_file (tree, filename, checksum2, &error));
{
g_autofree char *out_checksum = NULL;
- gs_unref_object OstreeMutableTree *subdir = NULL;
+ glnx_unref_object OstreeMutableTree *subdir = NULL;
g_assert (ostree_mutable_tree_lookup (tree, filename, &out_checksum, &subdir, &error));
g_assert_cmpstr (checksum2, ==, out_checksum);
}
{
const char *checksum = "01234567890123456789012345678901";
const char *subdir_checksum = "ABCD0123456789012345678901234567";
- gs_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
- gs_unref_object OstreeMutableTree *subdir = NULL;
+ glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
+ glnx_unref_object OstreeMutableTree *subdir = NULL;
GError *error = NULL;
g_assert_null (ostree_mutable_tree_get_contents_checksum (tree));